package com.example.demo.cimfrontroute;

import com.example.demo.cimfrontroute.kit.ServerListListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class CimFrontRouteApplication implements CommandLineRunner {

	private final static Logger LOGGER = LoggerFactory.getLogger(CimFrontRouteApplication.class);

	public static void main(String[] args) {
		SpringApplication.run(CimFrontRouteApplication.class, args);
		LOGGER.info("启动 route 成功");
	}


	@Override
	public void run(String... strings) throws Exception {
		//监听服务
		Thread thread = new Thread(new ServerListListener());
		thread.setName("zk-listener");
		thread.start();
	}
}


